package gulimall.controller;

import gulimall.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author HLF
 * @date 2022/4/24 10:06
 */
@RestController
@RefreshScope
public class NacosConfigController {
    @Value("${config.info}")
    private String configInfo;

    @Value("${mybatis-plus.global-config.db-config.id-type}")
    private String idType;

    @GetMapping("/configInfo")
    public R configInfo() {
        return R.ok().put("configInfo", configInfo);
    }

    @GetMapping("/idType")
    public R idType() {
        return R.ok().put("idType", idType);
    }

    @GetMapping("/testJ")
    public String testJ(){
        return "hello jemeter";
    }
}
